package com.winhxd.b2c.common.domain.search.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("商品数据实体")
public class ProductDocument {
    @ApiModelProperty("商品sku编号")
    private Long skuId;
    @ApiModelProperty("分组统计属性")
    private String spuColor;
    @ApiModelProperty("商品名称")
    private String spuName;
    @ApiModelProperty("商品spu编号")
    private Long spuId;
    @ApiModelProperty("款号编码")
    private String skuStyleCode;
    @ApiModelProperty("品牌Id")
    private Long brandId;
    @ApiModelProperty("品牌名称")
    private String brandName;
    @ApiModelProperty("库存")
    private Long stock;
    @ApiModelProperty("销量")
    private Long salesVolume;
    @ApiModelProperty("颜色规格Id")
    private Long colorAttributeOptionId;
    @ApiModelProperty("颜色规格名称")
    private String colorAttributeOption;
    @ApiModelProperty("大小规格Id")
    private Long sizeAttributeOptionId;
    @ApiModelProperty("大小规格名称")
    private String sizeAttributeOption;
    @ApiModelProperty("指导价格")
    private BigDecimal guidePrice;
    @ApiModelProperty("结算价格")
    private BigDecimal settlementPrice;
    @ApiModelProperty("价格方案Id")
    private Long priceProgramId;
    @ApiModelProperty("排序用时间")
    private Date skuTime;
    @ApiModelProperty("图片列表")
    private List<String> images;
    @ApiModelProperty("标签列表")
    private List<Tag> tags;
    @ApiModelProperty("分类列表")
    private List<Category> categories;

    @Data
    @ApiModel("商品分类")
    public static class Category {
        @ApiModelProperty("一级分类Id")
        private Integer categoryOneId;
        @ApiModelProperty("一级分类名称")
        private String categoryOneName;
        @ApiModelProperty("二级分类Id")
        private Integer categoryTwoId;
        @ApiModelProperty("二级分类名称")
        private String categoryTwoName;
    }

    @Data
    @ApiModel("商品标签")
    public static class Tag {
        @ApiModelProperty("标签名称")
        private String name;
        @ApiModelProperty("标签Id")
        private Long id;
    }
}
